1. Field of the Invention
The present invention relates to a decrypting compiler that accepts encrypted source code, decrypts the encrypted source code into plain text that is not available outside the compiler, and compiles the decrypted source code into a linkable object.
2. Description of the Related Art
In today""s environment for software development, it is common for a software manufacturer to market software libraries to third-party software developers. The third-party software developers, in turn, use the libraries to write special purpose and customized application programs that are distributed to end users. As an example, a software manufacturer might develop a software library that includes functions to interface to hardware such as a digital camera or a printer. The software manufacturer supplies the software library to a third-party software developer, who might use the software library to develop a customized camera or printer application. The developer then compiles his customized code, together with the software library provided by the software manufacturer, so as to produce an executable application program that is then distributed to end users.
One problem encountered in such an arrangement arises from the existence of trade secret and other proprietary information that might reside in the software manufacturer""s library. Because of the existence of trade secret and proprietary information, it is rare for a software manufacturer to supply source code for its software library. In particular, in a case where source code for the software library is provided to third-party developers, those third-party developers could easily learn of the trade secret and proprietary information from such source code. For this reason, most software manufacturers simply do not supply source code to third-party developers. Rather, what is supplied to third-party developers is a pre-compiled and linkable object which the third-party developer links with his customized code. Because source code is not supplied, the trade secret and proprietary information cannot be learned by the third-party developer.
For example, as shown in FIG. 9, a third-party developer uses programming application 100 to generate developer-generated source code 101. This developer-generated source code is compiled by compiler 102, and resulting object code 103 is linked to linkable libraries 104 by linker 105 to create executable binaries 106. Linkable libraries 104 are supplied to the developer; however, in order to protect proprietary information therein, no source code is provided for the libraries.
The solution of providing pre-compiled linkable objects is not satisfactory, however, particularly when there are many different target platforms for the library. The reason that this solution is not satisfactory, is that the pre-compiled library must be compiled by the software manufacturer for each different target platform, making version maintenance and cross-platform compatibility complicated.
It is an object of the invention to provide a different solution to distribution of software libraries, that eases version maintenance and cross-platform compatibility problems, while at the same time protecting trade secret and proprietary information that might be contained in the software library""s source code.
In one aspect, the invention is a decrypting compiler that accepts encrypted source code, and decrypts the encrypted source code into plain text that is not accessible outside the compiler. According to the invention, rather than providing plain-text source code for its software libraries, the software manufacturer instead provides encrypted source code. Since the source code is encrypted, third-party software developers cannot learn of proprietary and trade secret information contained in the source code. At the same time, because the compiler is working with source code, as opposed to a linker working with a pre-compiled linkable object, version maintenance and cross-platform compatibility is simplified. That is, with a decrypting compiler according to the invention, and with the software manufacturer providing encrypted source code rather than pre-compiled linkable objects, it is possible for the software manufacturer to provide only a single version of its software library, leaving to the compiler its usual responsibility of turning out different versions for each different target platform.
The decrypting compiler preferably uses a proprietary single-key encryption/decryption algorithm so that third-party software developers cannot learn of decrypted plain text source code. Alternatively, public key/private key encryption can be employed, with the private key being embedded in the decrypting compiler. Either way, the decrypting compiler decrypts the encrypted source code such that decrypted plain text for the source code is not accessible outside the compiler.
Further preferred embodiments of the decrypting compiler accept a parameter or parameters from the third-party software developer, with the parameters corresponding to one of plural different possible target platforms. By supplying the decrypting compiler with parameters that specify characteristics of a particular target platform, the decrypting compiler is able to compile different sections of the decrypted source code (through use of standard #if and #endif compiler directives) so as to tailor the compiler""s output for the target platform. For example, the compiler""s output could be tailored for a target platform having a particular processor such as a very long instruction word (VLIW) processor, based on parameters specifying a cluster type of the processor, register partitioning information for the processor, and the like.